
import VueRouter from 'vue-router';
// tabbar
import HomeContainer from './components/tabbar/homeContainer.vue';
import MemberContainer from './components/tabbar/memberContainer.vue';
import SearchContainer from './components/tabbar/searchContainer.vue';
import ShopcarContainer from './components/tabbar/shopcarContainer.vue';

// news
import NewsList from './components/news/NewsList.vue';
import NewsInfo from './components/news/NewsInfo.vue';

// 图片共享
import Photolist from './components/photos/PhotoList.vue';
import PhotoInfo from './components/photos/PhotoInfo.vue';

// 商品
import GoodsList from './components/goods/GoodsList.vue';
import GoodsInfo from './components/goods/GoodsInfo.vue';
import goodsdesc from './components/goods/goodsdesc.vue';
import goodsComment from './components/goods/goodscomment.vue';

var router=new VueRouter({
    routes:[
        {path:'/',redirect:'/home'},
        {path:'/home',component:HomeContainer},
        {path:'/member',component:MemberContainer},
        {path:'/shopcar',component:ShopcarContainer},
        {path:'/search',component:SearchContainer},
        {path:'/home/newsList',component:NewsList},
        {path:'/home/newsInfo/:id',component:NewsInfo},
        {path:'/home/photolist',component:Photolist},
        {path:'/home/photoInfo/:id',component:PhotoInfo},
        {path:'/home/goodslist',component:GoodsList},
        {path:'/home/goodsInfo/:id',component:GoodsInfo,name:'goodsInfo'},
        {path:'/home/goodsdesc/:id',component:goodsdesc,name:'goodsdesc'},
        {path:'/home/goodscomment/:id',component:goodsComment,name:'goodsComment'}

    ],
    // 设置高亮
    linkActiveClass:'mui-active'
})
// 导出路由
export default router;